package com.gzx.plugin.tjzy.feign.repayment.controller;

import com.gzx.plugin.tjzy.feign.repayment.service.GzxRepaymentRecordFeignService;
import com.gzx.tjzy.feign.req.repayment.RepaymentReqDto;
import com.gzx.tjzy.feign.resp.repayment.RepaymentRespDto;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author zjt
 * @description 还款记录
 */
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/feign/tjzy/repayment")
public class GzxRepaymentRecordFeignController {

    private final GzxRepaymentRecordFeignService repaymentRecordFeignService;

    @RequestMapping("/getRepaymentList")
    public List<RepaymentRespDto> getRepaymentList(@RequestBody RepaymentReqDto repaymentReqDto) {
        return repaymentRecordFeignService.getRepaymentList(repaymentReqDto);
    }

    @RequestMapping("/getLastMonthRepaymentList")
    public List<RepaymentRespDto> getLastMonthRepaymentList() {
        return repaymentRecordFeignService.getLastMonthRepaymentList();
    }
}
